package com.jinhua.admin.entity;

import com.jinhua.admin.vo.UserVo;


import com.jinhua.mybatis.annotation.Column;
import com.jinhua.mybatis.annotation.Table;
import com.jinhua.mybatis.entity.BaseEntity;
import com.jinhua.mybatis.util.AutoGenerateCode;
import lombok.Data;

/**
 * Copyright
 *
 * @Author WuHuang
 * @Date 2022/7/8
 */

@Data
@Table(commit = "用户会员表", prefix = "do")
public class UserPo extends BaseEntity<UserPo> {

    private static final long serialVersionUID = 6040846530672185552L;


    @Column(commit = "用户名", length = 50)
    private String userName;

    @Column(commit = "昵称", length = 200)
    private String nickName;

    @Column(commit = "密码", length = 200)
    private String password;

    @Column(commit = "open_id",length = 30)
    private String openId;

    @Column(commit = "手机号",length = 20)
    private String phone;

    @Column(commit = "头像",length = 255)
    private String avatar;

    @Column(commit = "用户唯一id",length = 30)
    private String unionId;

    @Column(commit = "状态:0-正常,1-封禁",length = 3)
    private Integer status;

    @Column(commit = "当前房间的房卡数量",length = 3)
    private Integer roomCardsNum;



    public static void main(String[] args) {
        AutoGenerateCode.generate(UserPo.class);
    }


    public UserVo copyUserVo() {
        UserVo vo = new UserVo();
        org.springframework.beans.BeanUtils.copyProperties(this, vo);
        return vo;
    }

}
